package cn.stronglink.assetmanage.business.inspection.view.resiger;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.Spinner;
import android.widget.TextView;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import cn.stronglink.assetmanage.R;

import cn.stronglink.assetmanage.business.inspection.adapter.RepairRegisterOrderApdapter;
import cn.stronglink.assetmanage.business.inspection.view.repairDetail.RepairDetailFragment;
import cn.stronglink.assetmanage.entity.RepailDetail;
import cn.stronglink.assetmanage.entity.Repair;
import cn.stronglink.assetmanage.utils.Constants;
import cn.stronglink.assetmanage.utils.ToastUtil;

/**
 * 维修登记界面
 * Created by zhengjinglan on 2018/6/15.
 */

public class RepairRegisterView {
    private Fragment fragment;
    //资源列表
    private RepairRegisterOrderApdapter repairRegisterOrderApdapter;

    public RepairRegisterView(Fragment fragment, View view, RepairRegisterOrderApdapter repairRegisterOrderApdapter) {
        this.fragment = fragment;
        ButterKnife.bind(this, view);
        this.repairRegisterOrderApdapter = repairRegisterOrderApdapter;
    }

    public void showWaitOrderDetail(String sn) {
        //跳转到详情页面
        Fragment detailFragment = new RepairDetailFragment();
        FragmentManager fragmentManager = fragment.getActivity().getSupportFragmentManager();
        FragmentTransaction transaction = fragmentManager.beginTransaction();
        transaction.replace(R.id.frame_business,detailFragment);
        transaction.commit();
        Bundle bundle=new Bundle();
        bundle.putString(Constants.SEARCH_REPAIR_NO, sn);
        detailFragment.setArguments(bundle);
    }


    public void hideProgressDialog(){

    }

    public void showToast(String msg){
        ToastUtil.toastShort(msg);
    }



}
